%%%-------------------------------------------------------------------
%%% File    : ewgi_application.erl
%%% Authors : Filippo Pacini <pacini@sgconsulting.it>
%%%           Hunter Morris <huntermorris@gmail.com>
%%% License :
%%% The contents of this file are subject to the Mozilla Public
%%% License Version 1.1 (the "License"); you may not use this file
%%% except in compliance with the License. You may obtain a copy of
%%% the License at http://www.mozilla.org/MPL/
%%%
%%% Software distributed under the License is distributed on an "AS IS"
%%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%%% the License for the specific language governing rights and
%%% limitations under the License.
%%% The Initial Developer of the Original Code is S.G. Consulting
%%% srl. Portions created by S.G. Consulting s.r.l. are Copyright (C)
%%% 2007 S.G. Consulting srl. All Rights Reserved.
%%%
%%% @doc 
%%% <p>ewgi application behaviour.</p>
%%%
%%% @end
%%%
%%% Created : 22 May 2008 by Hunter Morris <huntermorris@gmail.com>
%%%-------------------------------------------------------------------
-module(ewgi_application).

%% Public API
-export([run/3]).

%% Behaviour callback information
-export([behaviour_info/1]).

behaviour_info(callbacks) ->
    [{init,1},{handle_request,2}];
behaviour_info(_Other) ->
    undefined.

run(Application, Env, StartResp) when is_function(Application, 2) ->
    Application(Env, StartResp);
run(Application, Env, StartResp) ->
    Application:handle_request(Env, StartResp).
